<?php
$lang = new Zend_Session_Namespace('language');
if($lang->type == VN)
{
    $lang_data = new Zend_Translate('csv',ROOT_LANGUAGE.DS.'language_vn.csv');
    $langType = 'vn';
}else{
    $lang_data = new Zend_Translate('csv',ROOT_LANGUAGE.DS.'language_en.csv');
    $langType = 'en';
}
?>

<?php if ($this->pageCount): ?>

    <div class="pager">

        <div class="pager-counter">

            <?php echo $lang_data->_('Showing') ?> <strong><?php echo $this->firstItemNumber?> - <?php echo $this->lastItemNumber?></strong>

            <?php echo $lang_data->_('of') ?> <strong><?php echo $this->totalItemCount?></strong>

        </div>

        <div class="pager-outer">

            <div class="pager-inner">

                <!-- Previous page link -->

                <?php if (isset($this->previous)): ?>

                  <a href="<?php echo $this->url(array('page' => $this->previous), 'default', false); ?>" class="page-mover">

                    &lt; <?php echo $lang_data->_('Prev') ?>

                  </a>

                <?php endif; ?>

                <?php //Now put the first page link

                if($this->current > 1 && $this->firstPageInRange > 1){ ?>

                    <a href="<?php echo $this->url(array('page' => 1), 'default', false); ?>" class="page-mover page-mover-numeric"><?php echo "1"?></a> ..

                <?php } ?>

                <!-- Numbered page links -->

                <?php foreach ($this->pagesInRange as $page): ?>

                  <?php if ($page != $this->current): ?>

                    <a href="<?php echo $this->url(array('page' => $page), 'default', false); ?>" class="page-mover-numeric page-mover">

                        <?php echo $page; ?>

                    </a>

                  <?php else: ?>

                    <span class="page-mover-numeric pave-mover page-mover-current"><?php echo $page; ?></span>

                  <?php endif; ?>

                <?php endforeach; ?>

                <?php //Now put the last page link

                if($this->current != $this->last && $this->last > $this->lastPageInRange){ ?>

                    .. <a href="<?php echo $this->url(array('page' => $this->last), 'default', false); ?>" class="page-mover-numeric"><?php echo $this->last; ?></a>

                <?php } ?>

                <!-- Next page link -->

                <?php if (isset($this->next)): ?>

                  <a href="<?php echo $this->url(array('page' => $this->next), 'default', false); ?>" class="page-mover">

                    <?php echo $lang_data->_('Next') ?>  &gt;

                  </a>

                <?php endif; ?>

            </div>

        </div>

    </div>

<?php endif; ?>
